<?php

namespace App\Admin\show;

use App\Models\GrCoupon;
use App\Models\GrGood;
use App\Models\GrIntegral;
use Dcat\Admin\Support\LazyRenderable;
use Dcat\Admin\Widgets\Table;

class Coupon extends LazyRenderable
{

    public function render()
    {
        $coupon_id=$this->coupon_id;
        $data=GrCoupon::where('coupon_id',$coupon_id)->get(['coupon_id', 'coupon_name', 'coupon_min_price','coupon_stock','coupon_price','coupon_type']);
        $data=$data->toArray();
        $titles = [
            'ID',
            '优惠券名称',
            '触发价格',
            '优惠券库存',
            '折扣价格',
            '优惠券类型',
        ];

        return Table::make($titles, $data);
    }


}
